module M 
  def self.included(c1)
    puts "I have just been mixed into #{c1}"
    #类方法
    def c1.a_class_method
      puts "Now the class has a new class method."
    end
  end
  #实例方法
  def an_inst_method
    puts "This module supplies this instance method."
  end
end
class D 
  include M 
end
c = D.new
c.an_inst_method
D.a_class_method